import { Redirect } from 'react-router-dom';
import Login from '../pages/Login/Login'
import Home from '../pages/Home/Home'
import Bookrack from '../pages/Bookrack/Bookrack';
import Details from '../pages/Details/Details'
import Bookcity from '../pages/Bookcity/Bookcity';
import Classify from '../pages/Classify/Classify';
import Mine from '../pages/Mine/Mine';
const routes=[
  {
    path:'/',
    exact: true,
    render: () => (
      <Redirect to="/home"/>
    )
  },
  {
    path:'/home',
    component:Home,
    routes: [
      {
        path: "/home",
        exact: true,
        render: () => (
          <Redirect to="/home/bookrack"/>
        )
      },
      {
        path: "/home/bookrack",
        exact: true,
        component:Bookrack
      },
      {
        path: "/home/bookcity",
        exact: true,
        component:Bookcity
      },
      {
        path: "/home/classify",
        exact: true,
        component:Classify
      },
      {
        path: "/home/mine",
        exact: true,
        component:Mine
      },
    ]
  },
  {
    path:'/login',
    exact: true,
    component:Login
  },
  {
    path:'/details',
    exact:true,
    component:Details
  }
]

export default routes